@log1
class MyClass {
    constructor() {
        this.name = 'chou';
    }
    @log2
    getName() {
        console.log(this.name);
    }
    @log2 name = "chou";
    @log2 static age = 10;
}

// es6的class prototype?
// class 只是语法糖 本质上还是原型式继承
function log1(target) {
    target.prototype.logger = () => console.log(`我是${target.name}类`);
}
function log2(target, name, discriptor) {
    console.log('target:', target);
    console.log('name:', name);
    console.log("discriptor", discriptor);
}

const test = new MyClass();
test.logger();
console.log(MyClass.age);